﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CutPageControl.ascx.cs" Inherits="DingHeng.TransportationManagement.WebSite.userControls.CutPageControl" %>
<table class="noborderTable">
    <tr>
        <td style="width:70%;">当前页
      &nbsp;<font color="blue"><b><i><%=this.PageIndex %>/<%=this.PageCount %></i></b></font>&nbsp;
    页
    |
    总计 
    &nbsp;<b><i><font color="blue"><%=this.DataCount %></font></i></b>&nbsp;&nbsp;项
        </td>
        <td style="width:30%;">
            <asp:LinkButton ID="lbtnFirst" ToolTip="首页" OnCommand="PageSelected_Command"
                runat="server" />
            <asp:LinkButton ID="lbtnPrev" ToolTip="上一页" OnCommand="PageSelected_Command"
                runat="server" />
            <asp:LinkButton ID="lbtnNext" ToolTip="下一页" OnCommand="PageSelected_Command"
                runat="server" />
            <asp:LinkButton ID="lbtnLast" ToolTip="尾页" OnCommand="PageSelected_Command"
                runat="server" />转到
    <asp:TextBox ID="tbPage" runat="server" CssClass="pager_text"></asp:TextBox>页
            <asp:Button ID="btnGo" runat="server" CssClass="pager_go" OnClick="btnGo_Click" />
            
        </td>
    </tr>
</table>


<script type="text/javascript">
    var NS4 = (document.layers) ? true : false;
    $(function () {
        $("#<%=tbPage.ClientID %>").keyup(function (event) {

            var rtn = "";
            var v = $(this).val();
            for (var i = 0; i < v.length; i++) {
                var num = parseInt(v.substring(i, i + 1));
                if (!isNaN(num))
                    rtn += num;
            }
            $(this).val(rtn);
        }).keypress(function () {
            var code = 0;
            code = NS4 ? event.which : event.keyCode;
            if (code == 13) {

                if (!CheckGoPage())
                    return false;
                if (NS4)
                    event.keyCode = 9;
                else
                    event.which = 9;
                event.returnValue = false;
                <%=this.Page.ClientScript.GetPostBackEventReference(btnGo,"") %>;
            }
        });
    });

</script>
